package 迭代器设计模式;

import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {

        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(1);
        list.add(1);
        list.add(1);
        ConcreteCollection concreteCollection = new ConcreteCollection(list);
        Iterator iterate = concreteCollection.iterate();
        while (iterate.hasNext()) {
            System.out.println(iterate.next());
        }
    }
}
